//路由配置

import Main from "../views/Main";
import Detail from "../views/Detail";
import Login from "../views/Login";
import Pay from "../views/Pay";
import Address from "../views/Address";
import Order from "../views/Order";
import Sousuo from "../views/Sousuo";
import Cang from "../views/Cang";
import Dingdan from "../views/Dingdan";
import Myaddress from "../views/Myaddress";
import Editaddress from "../views/Editaddress";
//Main页面的二级路由页面
import Home from "../views/Home";
import Menu from "../views/Menu";
import Shopbag from "../views/Shopbag";
import My from "../views/My";

export default [
    {
        path: "/",
        element: <Main></Main>,
        children: [
            {
                path: "",
                element: <Home></Home>,
            },
            {
                path: "menu",
                element: <Menu></Menu>,
            },
            {
                path: "shopbag",
                element: <Shopbag></Shopbag>,
            },
            {
                path: "my",
                element: <My></My>,
            },
        ],
    },
    {
        path: "/detail/:pid",
        element: <Detail></Detail>,
    },
    {
        path: "/login",
        element: <Login></Login>,
    },
    {
        path: "/pay",
        element: <Pay></Pay>,
    },
    {
        path: "/address",
        element: <Address></Address>,
    },
    {
        path: "/order",
        element: <Order></Order>,
    },
    {
        path: "/sousuo",
        element: <Sousuo></Sousuo>,
    },
    {
        path: "/cang",
        element: <Cang></Cang>,
    },
    {
        path: "/dingdan",
        element: <Dingdan></Dingdan>,
    },
    {
        path: "/myaddress",
        element: <Myaddress></Myaddress>,
    },
    {
        path: "/editaddress/:aid",
        element: <Editaddress></Editaddress>,
    },
];
